# coding=utf-8
# dn_sulfur(刘忙 qq:734523893)

# 1.filter判断[0,False,True,5,{},(2,3)]对应bool值

# a_list = [0,False,True,5,{},(2,3)]
# re0 = list(filter(lambda x:bool(x)==True,a_list))
# print(re0)
# re1 = list(filter(lambda x:bool(x)==False,a_list))
# print(re1)

# 2.map实现1-10中所有奇数项的三次方,打印输出结果

# def f3(n):
#     return n**3
#
# re2 = map(f3,filter(lambda x:x%2==1,range(1,11)))
# print(list(re2))




# 3.reduce实现1-100所有偶数项的和
# from functools import reduce
#
# oushu = list(filter(lambda x:x%2==0,range(1,101)))
# re3 = reduce(lambda x,y:x+y,oushu)
# print(re3)



# 4.用递归函数实现


def feb(n):
    if n <= 1:
        return n
    return feb(n-1)+feb(n-2)

print(feb(10))


